﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<!--Head-->
<head>
    <meta charset="utf-8" />
    <title>登录</title>
    <meta name="description" content="login page" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" href="__ADMIN__/css/ace.css" class="ace-main-stylesheet" id="main-ace-style" />
    <style>
        .logbox{
            width: 500px;
            height: 500px;
            margin:250px auto;
            background-color: #fff;
        }
        .title{
            width: 250px;
            margin:0px auto;
            padding:20px;
            text-align: center;
        }
        .logo{
            float:left;
            width:50%;
        }
        .name{
            float:left;
            font-size:35px;
            color:#427fed;
            margin-top:10px;
            width:50%;
        }
        .info{
            margin:140px auto;

        }
        .loginbox_input{

            padding:10px 50px;
        }
        .loginbox_input input{
            width:97%;
            border-radius:3px !important;
            border:1px solid #666;
        }
        .submitbtn{
            padding:10px 47px;
        }
        .submitbtn input{
            width:100%;
            border-radius:3px !important;
            background-color: #428bca;
            color:#fff;
            border-color: #428bca;
            font-size: 15px;
            font-weight: 400;
            line-height: 2.42857143;
            text-align: center;

        }


    </style>
</head>
<!--Head Ends-->
<!--Body-->
<body>
    <div class="logbox" >
        <div class="title">
            <div class="logo">
                <img  width="100" src="__ADMIN__/image/logo.png" alt="">
            </div>
            <div class="name">
                私有云
            </div>
            <div class="clear"></div>
        </div>
        <div class="info">
            <div class="loginbox_input">
                <input type="text" name="username" placeholder="用户名">
            </div>
            <div class="loginbox_input">
                <input type="text" name="psd" placeholder="密码">
            </div>
            <div class="submitbtn">
                <input type="submit" id="login" value="登录">
            </div>

        </div>


    </div>
    <script type="text/javascript">
        $('#login').click(function(){
                var account = $.trim($('#account').val());
                if(account == ''){
                    alert('账号不能为空');
                    return false;
                }
                var password = $.trim($('#password').val());
                if(password == ''){
                    alert('密码不能为空');
                    return false;
                }
                $.post('./login.php',{'account':account,'password':password},function(res){
                    console.log(res);
                    if(res.status == 1){
                        location.href="index.php";
                    }else{
                        alert(res.msg);
                    }
                },'json');
        }); 
    </script>
</body>
<!--Body Ends-->
</html>
